Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 23, 2024

Bumps rich-domain from 1.25.0 to 1.25.1.

Release notes

Sourced from rich-domain's releases.

v1.25.1

What's Changed

Full Changelog: 4lessandrodev/rich-domain@v1.25.0...v1.25.1

Changelog

Sourced from rich-domain's changelog.

[1.25.1] - 2024-12-20

Feat

  • Dynamic Typing in Result Made Optional:
    • Developers can now choose between Result<T> (non-nullable) and Result<T | null> (nullable), based on their specific use case.
    • This update allows greater flexibility for explicit null handling without forcing unnecessary complexity in scenarios where nullability is not required.

Examples

  1. Explicit Null Handling:
    Use Result<T | null> to manage nullable states explicitly:

    class SampleNullish {
        public static create(props: Props): Result<SampleNullish | null> {
            if (!props.name || props.name.trim() === '') {
                return Fail('name is required');
            }
            return Ok(new SampleNullish(props));
        }
    }
  2. Non-Nullable Values:
    Use Result<T> for cases where null handling is unnecessary:

    class Sample {
        public static create(props: Props): Result<Sample> {
            if (!props.name || props.name.trim() === '') {
                return Fail('name is required');
            }
            return Ok(new Sample(props));
        }
    }

Fix

  • Enhanced backward compatibility by making nullable typing optional, ensuring existing integrations using Result<T> remain unaffected.

Impact

  • Improved Flexibility:
    Developers can adapt the Result type to suit their needs, supporting nullable and non-nullable use cases seamlessly.

  • Enhanced Clarity:
    Provides explicit type inference, ensuring safer and more intuitive code handling for nullable scenarios.


Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [rich-domain](https://github.com/4lessandrodev/rich-domain) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/4lessandrodev/rich-domain/releases)
- [Changelog](https://github.com/4lessandrodev/rich-domain/blob/main/CHANGELOG.md)
- [Commits](4lessandrodev/rich-domain@v1.25.0...v1.25.1)

---
updated-dependencies:
- dependency-name: rich-domain
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 23, 2024
@4lessandrodev 4lessandrodev merged commit 9709f1b into main Dec 23, 2024
1 check passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/rich-domain-1.25.1 branch December 23, 2024 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants